/**
 * Copyright (C) 2012 The SkyTvOS Project
 * <p/>
 * Version     Date           Author
 * ─────────────────────────────────────
 * 2014年12月23日         luwei
 */

package com.coocaa.x.service.litedaemon.daemons.tvpie.player;

import com.alibaba.fastjson.JSON;
import com.coocaa.x.framework.utils.LogUtils;

public class ResourceData {
    private int currentEpisode = 0;
    private String currentSource = "";
    private String resourceName = "";
    private String resourceUrl = "";
    private int sourceCount = 0;
    private String sourceList = "";
    private int totalEpisode = 0;

    public enum CLARITY {
        SOURCE_UD, SOURCE_HD, SOURCE_SD
    }

    public void addSource(CLARITY clarity) {
        sourceList = sourceList + clarity.toString() + ":";
        sourceCount++;
    }

    public int getCurrentEpisode() {
        return currentEpisode;
    }

    public void setCurrentEpisode(int currentEpisode) {
        this.currentEpisode = currentEpisode;
    }

    public String getCurrentSource() {
        return currentSource;
    }

    public void setCurrentSource(String currentSource) {
        LogUtils.d("set current source is " + currentSource);
        this.currentSource = currentSource;
    }

    public String getResourceName() {
        return resourceName;
    }

    public void setResourceName(String resourceName) {
        this.resourceName = resourceName;
    }

    public String getResourceUrl() {
        return resourceUrl;
    }

    public void setResourceUrl(String resourceUrl) {
        this.resourceUrl = resourceUrl;
    }

    public int getSourceCount() {
        return sourceCount;
    }

    public void setSourceCount(int sourceCount) {
        this.sourceCount = sourceCount;
    }

    public String getSourceList() {
        return sourceList;
    }

    public void setSourceList(String sourceList) {
        this.sourceList = sourceList;
    }

    public int getTotalEpisode() {
        return totalEpisode;
    }

    public void setTotalEpisode(int totalEpisode) {
        this.totalEpisode = totalEpisode;
    }

    @Override
    public String toString() {
        return JSON.toJSONString(this);
    }
}
